import "./main.css";
import popup from "./components/popup/popup";
import video from "./components/video/video";

let listItem = document.querySelectorAll(".list-wrapper li");

for (let index = 0; index < listItem.length; index++) {
  listItem[index].addEventListener("click", function () {
    let url = this.dataset.src;
    let title = this.dataset.title;
    popup({
      width: "880px",
      height: "560px",
      title: title,
      pos: "center",
      content(elem) {
        video({
          url,
          elem,
        });
      },
    });
  });
}
